package com.mapper;

import com.pojo.Invitation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface InvitationMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Invitation record);

    int insertSelective(Invitation record);

    Invitation selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Invitation record);

    int updateByPrimaryKey(Invitation record);
    //模糊查询所有的帖子
    @Select("<script>select * from invitation where 1=1" +
            "<if test='the !=null and !the.isEmpty()'>" +
            "and title like \"%\"#{the}\"%\"" +
            "</if>" +
            "</script>")
    List<Invitation> queryAllInvitation(@Param("the") String title);
}